Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Shapes

QuickDraw 3D provides routines that you can use to manage shape objects (or shapes). A shape object is any object that affects how and where a renderer renders an object in a view.

QuickDraw 3D provides six shape management routines that are identical in implementation to set routines discussed earlier:

Shape routine

Set routine

See page

Q3Shape_GetElement

Q3Set_Get

[link]

Q3Shape_AddElement

Q3Set_Add

[link]

Q3Shape_ContainsElement

Q3Set_Contains

[link]

Q3Shape_GetNextElementType

Q3Set_GetNextElementType

[link]

Q3Shape_EmptyElements

Q3Set_Empty

[link]

Q3Shape_ClearElement

Q3Set_Clear

[link]

Other shape management routines are described below.

Q3Shape_GetType

You can use the Q3Shape_GetType function to get the type of a shape.

TQ3ObjectType Q3Shape_GetType (TQ3ShapeObject shape);
shape
A shape object.

DESCRIPTION

The Q3Shape_GetType function returns, as its function result, the type of the shape specified by the shape parameter. The types of shapes currently supported by QuickDraw 3D are defined by these constants:

kQ3ShapeTypeCamera
kQ3ShapeTypeGeometry
kQ3ShapeTypeGroup
kQ3ShapeTypeLight
kQ3ShapeTypeShader
kQ3ShapeTypeStyle
kQ3ShapeTypeTransform
kQ3ShapeTypeUnknown

If the type of the shape cannot be determined or is invalid, Q3Shape_GetType returns the value kQ3ObjectTypeInvalid .

Q3Shape_GetSet

You can use the Q3Shape_GetSet function to get the set currently associated with a shape.

TQ3Status Q3Shape_GetSet (TQ3ShapeObject shape, TQ3SetObject *set);
shape
A shape object.
set
On exit, the set currently associated with the specified shape.

DESCRIPTION

The Q3Shape_GetSet function returns, in the set parameter, the set of elements currently associated with the shape object specified by the shape parameter.

Q3Shape_SetSet

You can use the Q3Shape_SetSet function to set the set associated with a shape.

TQ3Status Q3Shape_SetSet (TQ3ShapeObject shape, TQ3SetObject set);
shape
A shape object.
set
The desired set to be associated with the specified shape.

DESCRIPTION

The Q3Shape_SetSet function sets the set of elements to be associated with the shape object specified by the shape parameter to the set specified by the set parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |